c=1
cd target
rm *_fix.jar

rm -rf t
mkdir t
cd t
cp ../*.jar teamwork.zip
unzip -o teamwork.zip >>/dev/null
rm -rf META-INF/maven
cd BOOT-INF/lib
for jar in *.jar
do
  echo $jar
  rm -rf t
  mkdir t
  cd t
  cp ../$jar teamwork.zip
  unzip -o teamwork.zip >>/dev/null
  rm -rf META-INF/maven
  rm -rf META-INF/INFO*
  rm -rf META-INF/notice.txt
  echo "Manifest-Version: 1.0" > META-INF/MANIFEST.MF
  rm -rf teamwork.zip
  jar cfM $jar *
  mv $jar ..
  cd ..
  mv $jar $c.jar
  c=`echo $c|awk '{printf("%d", $1+1)}'`
done
rm -rf t
cd ../..
rm -rf teamwork.zip
#jar cfM teamwork_fix.jar *
jar cf0M teamwork_fix.jar *
mv teamwork_fix.jar ..
cd ..
rm -rf t
